package com;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class MyCallbel implements Callable<Integer> {
    @Override
    public Integer call()  {
        return 123456;
    }

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        MyCallbel mc=new MyCallbel();
        FutureTask<Integer> ft=new FutureTask<>(mc);
        Thread thread=new Thread(ft);
        thread.start();
        System.out.println(ft.get());
    }
}
